﻿<%@ Page Title="优惠活动" Language="C#" MasterPageFile="~/ePioneer/pay.master" AutoEventWireup="true"
    CodeFile="pay.aspx.cs" Inherits="ePioneer_pay" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        #radio4
        {
            height: 16px;
        }
        #radio1
        {
            height: 16px;
        }
        #radio2
        {
            height: 16px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="pl_labcnt pl_labcnt1" style="amrgin: 0; padding: 0;">
        <div class="box dpbox" style="display: block;">
            <form method="post" target="_blank" action="http://pay.emoney.cn/PayHander.aspx"
            id="frPayPost" style="amrgin: 0; padding: 0;">
            <div class="dpptit1">
                &nbsp;</div>
            <div class="dppinfo1" style="height: 197px;">
                <table width="93%" border="0" cellspacing="0" cellpadding="5">
                    <tr>
                        <td width="18%" align="right" style="color: #000">
                            产品名：
                        </td>
                        <td colspan="3">
                            益盟操盘手·L2盯盘先锋
                        </td>
                    </tr>
                    <tr style="display: none;">
                        <td colspan="4">
                            <label for="radio1">
                                <input type="radio" name="productid" id="radio3" value="20" checked="checked" />1分钱测试产品定购</label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" rowspan="2" style="color: #000;">
                            版 本：
                        </td>
                        <td width="18%" id="huodong">
                            <label for="radio3">
                                <input type="radio" name="productid" id="radio4" value="59" />两年版
                                3980元</label>
                        </td>
                        <td width="18%">
                            <label for="radio1">
                                <input type="radio" name="productid" id="radio1" value="60" checked="checked" />年版 <span id="huodongjia">
                                    2580</span>元</label>
                        </td>
                        <td width="68%">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" id="cuxiao" style="display:none;">
                            国庆期间促销价格，促销期结束，立刻恢复原价。
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="color: #000">
                            <span class="cred">*</span>订购数量：
                        </td>
                        <td colspan="3">
                            <label for="textfield">
                                <input type="text" name="count" class="inp1" value="1" id="txtNum" style="width: 100px;" />
                                套</label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="color: #000">
                            <span class="cred">*</span>姓 名：
                        </td>
                        <td colspan="3">
                            <input type="text" name="uname" class="inp1" id="txtName" />
                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="color: #000">
                            <span class="cred">*</span>手机号：
                        </td>
                        <td colspan="3">
                            <input type="text" name="tel" class="inp1" id="txtMobile" />
                            <input type="hidden" name="sourceType" class="inp1" id="Text1" value="2" />
                        </td>
                    </tr>
                    <%--<tr>
              <td align="right" style="color:#000">付款方式：</td>
              <td><label for="radio3"><input type="radio" name="rdPayType1" id="rdPayType1" value="radio" />货货到付款</label></td>
              <td><label for="radio4"><input type="radio" name="rdPayType2" id="rdPayType2" value="radio" />网上支付（支付宝，网银，信用卡）</label></td>
            </tr>--%>
                    <tr>
                        <td colspan="2" align="center" class="cred">
                            （*为必填内容）
                        </td>
                        <td colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <div class="adimg1">
                </div>
            </div>
            <%--<div class="dppinfo1" style="height:92px;">
          <table width="94%" height="100%" border="0" cellpadding="5" cellspacing="0">
            <tr>
              <td width="14%" align="right">联系地址：</td>
              <td><input type="text" name="txtAddr" class="inp1"  id="txtAddr" /></td>
              </tr>
            <tr>
              <td align="right">联系电话：</td>
              <td><input type="text" name="txtTel" class="inp1" id="txtTel" /></td>
              </tr>
            <tr>
              <td align="right">邮编：</td>
              <td><input type="text" name="txtZipcode" class="inp1" id="txtZipcode" maxlength="6" /></td>
              </tr>
          </table>
        </div>--%>
            <div class="subbtn1" onclick="SubmitPay();" style="cursor: pointer; bottom: 70px;">
            </div>
            </form>
        </div>
        <!--#include file="yhhd.htm"-->
        <div class="box">
        </div>
    </div>
    <script language="javascript" type="text/javascript">
        //字符串包含测试函数
        function CheckName(str) {
            var i;
            for (i = 0; i < str.length; i++) {
                var iCode = str.charCodeAt(i);
                if ((iCode >= 48 && iCode <= 57) || (iCode >= 65 && iCode <= 90) || (iCode >= 97 && iCode <= 122) || iCode > 255) {
                }
                else {
                    return false;
                    break;
                }
            }
            return true;
        }

        function SubmitPay() {
            var txtName = $("#txtName").val();
            var txtMobile = $("#txtMobile").val();
            var txtNum = $("#txtNum").val();
            if (txtNum == "") {
                alert("请填写订购数量");
                $("#txtNum").focus();
                return false;
            }
            if (txtNum == "0") {
                alert("订购数量必须大于0");
                $("#txtNum").focus();
                return false;
            }
            if (txtName == "") {
                alert("请填写姓名");
                $("#txtName").focus();
                return false;
            }
            else {
                if (!CheckName(txtName)) {
                    alert("姓名不能包含非法字符");
                    $("#txtName").focus();
                    return false;
                }
            }
            if (txtMobile == "") {
                alert("请填写手机号");
                $("#txtMobile").focus();
                return false;
            }
            var pattern = /^\d+?$/;
            if (!pattern.test(txtNum)) {
                alert("请输入正确的数量");
                $("#txtNum").focus();
                return false;
            }
            var patrn = /^0{0,1}1[3|5|8][\d]{9}$/;
            if (!patrn.exec(txtMobile)) {
                alert("请输入正确的手机号");
                $("#txtMobile").focus();
                return false;
            }
            document.getElementById('frPayPost').submit();
        }

        function QueryString() {
            var name, value, i;
            var str = location.href;
            var num = str.indexOf("?")
            str = str.substr(num + 1);
            var arrtmp = str.split("&");
            for (i = 0; i < arrtmp.length; i++) {
                num = arrtmp[i].indexOf("=");
                if (num > 0) {
                    name = arrtmp[i].substring(0, num);
                    value = arrtmp[i].substr(num + 1);
                    this[name] = value;
                }
            }
        }
        $(document).ready(function () {
            //StartTime();
            var request = new QueryString();
            if (request["t"] != null && request["t"] == "0") {
                $labnav = $(".dp_m .cnt .mbody6 .pl_labnav .s6_lab");
                $labcntent = $(".dp_m .cnt .mbody6 .pl_labcnt .box");
                $labnav.removeClass("s6_labover0").removeClass("s6_labover1");
                $labnav.eq(1).addClass("s6_labover1");
                $labcntent.eq(0).hide();
                $labcntent.eq(1).show();
            }
        });

        var NowTime = new Date();
        var EndTime = new Date(2011, 9, 1, 0, 0);
        //定时启动倒计时
        function StartTime() {
            NowTime = new Date();
            var startTime = new Date(2011, 8, 28, 0, 0);
            if (NowTime >= startTime && NowTime < EndTime) {
                $("#cuxiao").show();
                $("#huodong").hide();
                $("#huodongjia").html("2380");
            }
            else {
                $("#cuxiao").hide();
                $("#huodong").show();
                $("#huodongjia").html("3380");
            }
            setTimeout("StartTime()", 1000);
        }
    </script>
</asp:Content>
